# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=libunistring

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.9.3
pkgrel=2
pkgdesc="Library for manipulating Unicode strings and C strings. (mingw-w64)"
arch=('any')
url="http://www.gnu.org/software/libunistring"
license=("GPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
depends=("${MINGW_PACKAGE_PREFIX}-libiconv")
options=('staticlibs' 'strip')
source=("ftp://ftp.gnu.org/gnu/libunistring/libunistring-${pkgver}.tar.gz")
md5sums=('db8eca3b64163abadf8c40e5cecc261f')

build() {
    export lt_cv_deplibs_check_method='pass_all'
    mkdir -p "${srcdir}/build-${MINGW_CHOST}"
    cd "${srcdir}/build-${MINGW_CHOST}"
    "${srcdir}"/libunistring-${pkgver}/configure \
      --prefix=${MINGW_PREFIX} \
      --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST} \
      --enable-threads=win32

    make
}

package() {
    cd "${srcdir}/build-${MINGW_CHOST}"
    make DESTDIR="$pkgdir" install
}
